package com.itheima.test;

import java.util.Random;
import java.util.Scanner;

public class LoopTest7 {
    public static void main(String[] args) {
        //分析：
        //1. 生成 1~100 随机数
        Random r = new Random();
        int number = r.nextInt(100) + 1;
        //2.猜这个数组
        Scanner sc =new Scanner(System.in);


        while (true){
            int gussNumber = sc.nextInt();

            if (gussNumber >  number){
                System.out.println("大了");
            } else if (gussNumber < number) {
                System.out.println("小了");
            }else {
                System.out.println("猜对了");
                break;
            }
        }
    }
}
